package com.hfkh;

import java.util.Scanner;

/**
 * @Author MDD
 * @Description
 * @Version
 * @Date
 **/
public class No_6 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (true) {
            System.out.println("输入一个0到2之间的整数:");
            int number = sc.nextInt();
            switch (number) {
                case 0:
                    System.out.println("你出的是石头");
                    break;
                case 1:
                    System.out.println("你出的是剪刀");
                    break;
                case 2:
                    System.out.println("你出的是布");
                    break;
                default:
                    continue;
            }
            System.out.println("是否要继续出拳? 是的话请输入y");
            String choice = sc.next();
            if (!choice.equals("y") && !choice.equals("Y")) {
                System.out.println("游戏结束！");
                break;
            }
        }
    }
}
